<template>
    <div>
        <div id="container">

        </div>
        <button id="add" @click="add">添加</button>
    </div>

</template>
<script>
    export default {
      data() {
        return {

        }
      },
      methods: {
        add() {
          var oDiv;
          var container =document.getElementById('container');
          var node=container.nextSibling;
          oDiv = document.createElement('div');
          oDiv.innerHTML = "<div id='container1'>" +
            "<input type='text' id='test'>"+
            "</div>";
          container.parentNode.insertBefore(oDiv, node)
          node=oDiv.nextSibling;
        },
      },
    }
</script>

<style>




</style>
